package com.meitianhui.convenitenbuy.module.mine.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.hyphenate.easeui.widget.EaseImageView;
import com.meitianhui.convenitenbuy.R;
import com.meitianhui.convenitenbuy.module.mine.model.UserUrlBean;
import com.meitianhui.convenitenbuy.util.GlideUtils;

import java.util.List;

/**
 *  Created by amy on 2017/11/22.
 */

public class GroupMemberAdapter extends BaseQuickAdapter<UserUrlBean,BaseViewHolder>{
    public GroupMemberAdapter( @Nullable List<UserUrlBean> data) {
        super(R.layout.item_group_member, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, UserUrlBean item) {
        helper.setText(R.id.tv_item_group_member_name,item.getNickname());
        helper.setVisible(R.id.tv_item_group_member_in,item.isIfLiveIn()?true:false);
        //加载头像
        EaseImageView memberPhoto = helper.getView(R.id.iv_item_group_member_photo);
        GlideUtils.setCircleImage(mContext,item.getHead_pic_path(),R.drawable.ease_default_avatar,R.drawable.ease_default_avatar,memberPhoto);
    }
}
